#ifndef CLICKABLELABEL_H
#define CLICKABLELABEL_H

#include <QLabel>
#include <QStyleOption>
#include <QPainter>
#include <QMap>

class ClickableLabel : public QLabel
{
    Q_OBJECT
public:
    explicit ClickableLabel(QWidget *parent = 0);
    ~ClickableLabel();

    void addData(const QString &key, const QString &val);
    QString getData(const QString &key);
protected:
    void mouseReleaseEvent(QMouseEvent *ev);
signals:
    void clicked();
    void clicked(ClickableLabel *label);
public slots:
private:
    QMap<QString, QString> *map; // set private data
};

#endif // CLICKABLELABEL_H
